package chapter01.principle.lod;
//错误示例：链式调用违反 LoD

class A {
    private B b = new B();
    public void doSomething() {
        b.getC().doWork(); // 直接访问 C 的方法
    }
}

class B {
    private C c = new C();
    public C getC() { return c; }
}

class C {
    public void doWork() { /* ... */ }
}
